package cn.com.haopy.yue.ai.db.service.hos.impl;

import cn.com.haopy.yue.ai.db.entity.arisk.AIRiskStandardChargesCollect;
import cn.com.haopy.yue.ai.db.mapper.arisk.AIRiskStandardChargesCollectMapper;
import cn.com.haopy.yue.ai.db.service.BaseServiceImpl;
import cn.com.haopy.yue.ai.db.service.hos.AIRiskStandardChargesCollectService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.stereotype.Service;

/**
 * @Description: TODO
 * @Author DuTao
 * @Date 2025/3/26 9:13
 */
@Service
public class AIRiskStandardChargesCollectServiceImpl extends BaseServiceImpl<AIRiskStandardChargesCollectMapper, AIRiskStandardChargesCollect> implements AIRiskStandardChargesCollectService {

    @Override
    public AIRiskStandardChargesCollect getByUserChargeId(Integer userId, Integer chargeId) {
        QueryWrapper<AIRiskStandardChargesCollect> queryWrapper = new QueryWrapper<>();

        queryWrapper.lambda().eq(AIRiskStandardChargesCollect::getChargeId, chargeId);

        queryWrapper.lambda().eq(AIRiskStandardChargesCollect::getUserId, userId);

        return super.getOne(queryWrapper);
    }
}
